package com.gitee.qdbp.general.common.api.settings.model;

import com.gitee.qdbp.base.annotation.DataIsolation;
import com.gitee.qdbp.base.annotation.OperateTraces;

/**
 * 敏感词信息更新类
 *
 * @author zhh
 * @version 170802
 */
@OperateTraces(target = "where")
@DataIsolation(target = "where")
public class SensitiveWordUpdate extends SensitiveWordBean {

    /** 版本序列号 **/
    private static final long serialVersionUID = 1L;

    /** 租户编号是否更新为空值 **/
    private Boolean tenantCodeToNull;

    /** 敏感词类型(0.默认)是否更新为空值 **/
    private Boolean typeToNull;

    /** 敏感词是否更新为空值 **/
    private Boolean wordToNull;

    /** 敏感级别(1.禁止|2.警告)是否更新为空值 **/
    private Boolean levelToNull;

    /** 例外组合是否更新为空值 **/
    private Boolean excludeListToNull;

    /** 启用状态(1.正常|2.未启用)是否更新为空值 **/
    private Boolean usingStateToNull;

    /** 更新操作的条件 **/
    private SensitiveWordWhere where;

    /** 判断租户编号是否更新为空值 **/
    public Boolean isTenantCodeToNull() {
        return tenantCodeToNull;
    }

    /** 设置租户编号是否更新为空值 **/
    public void setTenantCodeToNull(Boolean tenantCodeToNull) {
        this.tenantCodeToNull = tenantCodeToNull;
    }

    /** 判断敏感词类型(0.默认)是否更新为空值 **/
    public Boolean isTypeToNull() {
        return typeToNull;
    }

    /**
     * 设置敏感词类型(0.默认)是否更新为空值
     *
     * @param typeToNull 敏感词类型(0.默认)是否更新为空值
     * @deprecated 该字段为非空字段
     */
    @Deprecated
    public void setTypeToNull(Boolean typeToNull) {
        this.typeToNull = typeToNull;
    }

    /** 判断敏感词是否更新为空值 **/
    public Boolean isWordToNull() {
        return wordToNull;
    }

    /**
     * 设置敏感词是否更新为空值
     *
     * @param wordToNull 敏感词是否更新为空值
     * @deprecated 该字段为非空字段
     */
    @Deprecated
    public void setWordToNull(Boolean wordToNull) {
        this.wordToNull = wordToNull;
    }

    /** 判断敏感级别(1.禁止|2.警告)是否更新为空值 **/
    public Boolean isLevelToNull() {
        return levelToNull;
    }

    /**
     * 设置敏感级别(1.禁止|2.警告)是否更新为空值
     *
     * @param levelToNull 敏感级别(1.禁止|2.警告)是否更新为空值
     * @deprecated 该字段为非空字段
     */
    @Deprecated
    public void setLevelToNull(Boolean levelToNull) {
        this.levelToNull = levelToNull;
    }

    /** 判断例外组合是否更新为空值 **/
    public Boolean isExcludeListToNull() {
        return excludeListToNull;
    }

    /** 设置例外组合是否更新为空值 **/
    public void setExcludeListToNull(Boolean excludeListToNull) {
        this.excludeListToNull = excludeListToNull;
    }

    /** 判断启用状态(1.正常|2.未启用)是否更新为空值 **/
    public Boolean isUsingStateToNull() {
        return usingStateToNull;
    }

    /**
     * 设置启用状态(1.正常|2.未启用)是否更新为空值
     *
     * @param usingStateToNull 启用状态(1.正常|2.未启用)是否更新为空值
     * @deprecated 该字段为非空字段
     */
    @Deprecated
    public void setUsingStateToNull(Boolean usingStateToNull) {
        this.usingStateToNull = usingStateToNull;
    }

    /** 获取更新操作的条件 **/
    public SensitiveWordWhere getWhere() {
        return where;
    }

    /** 获取更新操作的条件, force=是否强制返回非空条件 **/
    public SensitiveWordWhere getWhere(boolean force) {
        if (where == null && force) {
            where = new SensitiveWordWhere();
        }
        return where;
    }

    /** 设置更新操作的条件 **/
    public void setWhere(SensitiveWordWhere where) {
        this.where = where;
    }
}